﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static MyDelegate.Greeting;

namespace MyDelegate
{
    class Program
    {
        static void Main(string[] args)
        {
            //  MyDelegate.Show();

            //     Greeting.SayHi("Paul",Greeting.PeopleType.American);

            SayHiHander sayHiHandler = new SayHiHander(Greeting.SayHiChinese);
            Greeting.SayHiDelegate("谢跃", sayHiHandler);

            SayHiHander sayHiHandlerAmerican = new SayHiHander(Greeting.SayHiAmerican);
            Greeting.SayHiDelegate("Paul", sayHiHandlerAmerican);
            Console.ReadLine();
        }
    }
}
